{% extends 'admin/base.html'%}

{% block body%}
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    {% for message in get_flashed_messages() %}
                    <div class="alert alert-danger alert-dismissible" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                aria-hidden="true">×</span></button>
                        {{ message }}
                    </div>
                    {% endfor %}
                    <form method="post" action="{{url_for('admin.password')}}" class="site-form" novalidate>
                        {{form.csrf_token}}
                        <div class="form-group">
                            <label for="old-password">{{form.oldpassword.label}}</label>
                            {{form.oldpassword(class="form-control")}}
                        </div>
                        {% for message in form.oldpassword.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}
                        <div class="form-group">
                            <label for="old-password">{{form.password.label}}</label>
                            {{form.password(class="form-control")}}
                        </div>
                        {% for message in form.password.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}
                        <div class="form-group">
                            <label for="old-password">{{form.rpassword.label}}</label>
                            {{form.rpassword(class="form-control")}}
                        </div>
                        {% for message in form.rpassword.errors%}
                        <div class="form-group col-md-12" style="color: #f96868!important;">{{message}}</div>
                        {% endfor %}
                        {{form.submit(class='btn btn-primary')}}
                    </form>
                </div>
            </div>
        </div>

    </div>
</div>
{% endblock%}